﻿
Partial Class manage_company
    Inherits System.Web.UI.Page
    Dim userlist As MembershipUserCollection
    Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
        'import users
        userlist = Membership.GetAllUsers()
        Try
            updateusers.Delete()
            For Each item As MembershipUser In userlist
                'MsgBox(item.UserName)
                Session("username") = item.UserName
                Session("userlowered") = item.UserName.ToLower
                updateusers.Insert()
            Next
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub
    Protected Sub DropDownList2_SelectedIndexChanged1(sender As Object, e As EventArgs)
        Dim tbox As TextBox = FormView1.FindControl("AssignedAgentTextBox")
        Try
            Dim cmb As DropDownList = FormView1.FindControl("DropDownList2")
            tbox.Text = cmb.SelectedValue
        Catch ex As Exception

        End Try
    End Sub

    Protected Sub GridView1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles GridView1.SelectedIndexChanged
        FormView1.SetPageIndex(GridView1.SelectedIndex)

    End Sub

    Protected Sub DropDownList1_SelectedIndexChanged(sender As Object, e As EventArgs)
        Dim tbox As TextBox = FormView1.FindControl("AssignedAgentTextBox")
        Try
            Dim cmb As DropDownList = FormView1.FindControl("DropDownList1")
            tbox.Text = cmb.SelectedValue
        Catch ex As Exception

        End Try
    End Sub
End Class
